
<!DOCTYPE html>
<%@ include file="/WEB-INF/jsp/include/include.jsp"%>
<html>
<head>
<title>
	<fmt:message key="alvin.title" />
</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link href="${ctx}styles/bootstrap.min.css" rel="stylesheet" media="screen">
<link href="${ctx}styles/bootstrap-responsive.min.css" rel="stylesheet" />
<link href="${ctx}styles/bootswatch.css" rel="stylesheet" />
<link href="${ctx}styles/font-awesome.min.css" rel="stylesheet" />
<link href="${ctx}styles/style.css" rel="stylesheet" />
<script src="http://code.jquery.com/jquery.js"></script>
<script src="${ctx}scripts/bootstrap.min.js"></script>
<style type="text/css">
body {
	background: #e7f3f3;
}

body {
	height: 100%;
}

#wrap {
	height: 100%;
	display: block;
	text-align: center;
}

#wrap .box {
	display: block;
	height: auto;
	margin: auto;
	position: relative;
	top: 10%;
}
</style>
</head>
<body>
	<div id="wrap">
		<div class="box">
				<img alt="<fmt:message key='alvin.title' />" src="${ctx}images/cow.jpg">
				<form class="form-inline" action="${ctx}j_spring_security_check" method="POST">
					<input name="j_username" id="mobile" type="text" value="${mobile}" placeholder="<fmt:message key='login.mobile' />" class="input-small" />
					<input name="j_password" id="password" type="password" class="input-small" />
					<a href="${ctx}reg.htm" class="text-info"><fmt:message key="login.register" /></a>
					<button class="btn" type="submit">
						<fmt:message key='common.login' />
					</button>
					<c:if test="${not empty param.error}">
						<div class="error">
							<span> ${sessionScope['SPRING_SECURITY_LAST_EXCEPTION'].message} </span>
						</div>
					</c:if>
				</form>
		</div>
	</div>
	<script type="text/javascript">
		$(function() {
			$(window).resize(function() {
				var width = $(this).width();
				var height = $(this).height();
				if (width > height) {
					$("img").css({
						width : "auto",
						height : (height - 80) + "px"
					});
				} else {
					$("img").css({
						height : "auto",
						width : width + "px"
					});
				}

			});
			$(window).resize();

		});
	</script>
</body>
</html>